﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Sockets;
using System.Text;
using System.Threading.Tasks;
using TmU220PrintHelperV2d0.Interface;
using XpQ200PrintHelperV2d0;

namespace TmU220PrintHelperV2d0.Entity
{
    public class PrinterFactory
    {
        public static IPrinter GetPrinter(string deviceType, TcpClient tcpClient, string chineseEncodingName)
        {
            if (deviceType == "TM-U220")
            {
                return new TmU220PrinterV2d0(tcpClient, chineseEncodingName);
            }
            else if (deviceType == "XP-Q200")
            {
                return new XpQ200PrinterV2d0(tcpClient, chineseEncodingName);
            }
            else
            {
                return new TmU220PrinterV2d0(tcpClient, chineseEncodingName);
            }
        }
    }
}
